package com.xmkj.carwash.adapter;

import android.content.Context;

import com.common.carbean.MessageListBean;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.carwash.R;

import java.util.List;

/**
 * Created by chen on 2018/3/28.
 */

public class MessageAdapter extends CommonAdapter<MessageListBean.ListsEntity> {
    public MessageAdapter(Context context, List<MessageListBean.ListsEntity> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, MessageListBean.ListsEntity item, int position) {
        holder.setText(R.id.tv_title,item.title);
        holder.setText(R.id.tv_content,item.content);
        holder.setText(R.id.tv_time,item.create_time);
        holder.setOnClickListener(R.id.btn_delete,new OnItemChildClickListener());

    }

    @Override
    protected int getItemViewLayoutId(int position, MessageListBean.ListsEntity item) {
        return R.layout.item_message;
    }
}
